package org.ehe.finance.payable.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 到期提醒事件
 * @author :zhangnn
 * @className :DueReminderEvent
 * @description: TODO
 * @date 2025-09-02 10:53:06
 */
@Getter
public class DueReminderEvent extends ApplicationEvent {
    private final Long payableId;
    private final String billNo;
    private final Long supplierId;
    private final LocalDate dueDate;
    private final BigDecimal unpaidAmount;
    private final LocalDateTime eventTime;

    public DueReminderEvent(Object source, Long payableId, String billNo,
                            Long supplierId, LocalDate dueDate, BigDecimal unpaidAmount) {
        super(source);
        this.payableId = payableId;
        this.billNo = billNo;
        this.supplierId = supplierId;
        this.dueDate = dueDate;
        this.unpaidAmount = unpaidAmount;
        this.eventTime = LocalDateTime.now();
    }
}
